Skip to content

ci: add fork guards to docker, release, and auto-tag workflows#1007

Merged
wpfleger96 merged 1 commit into
mainfrom
worktree-wpfleger+add-fork-guards
Jun 12, 2026
Merged

ci: add fork guards to docker, release, and auto-tag workflows#1007
wpfleger96 merged 1 commit into
mainfrom
worktree-wpfleger+add-fork-guards

Conversation

@wpfleger96

Copy link
Copy Markdown
Collaborator

Hardens three GitHub Actions workflows against fork PRs that could consume secrets or trigger privileged operations.

This is a public OSS repo — fork PRs run on the upstream repo's infrastructure and can access secrets that aren't explicitly gated. Two of the affected workflows have contents: write and signing credentials; one has GHCR push access.

  • docker.yml: the build job's cache-to was unconditional, so fork PRs would attempt a registry push to ghcr.io/block/buzz-buildcache after skipping login, producing an auth error. Now cache-to evaluates to an empty string for fork PRs (build still runs, no cache write).
  • release.yml: adds if: github.repository == 'block/sprout' to all three jobs as defense-in-depth. The workflow is tag/dispatch-only so forks can't normally trigger it, but the guard makes intent explicit.
  • auto-tag-on-release-pr-merge.yml: the if condition checked the branch name but not the PR origin. A fork PR named version-bump/X.Y.Z merged by a maintainer would have created a version tag and triggered a full release build. Added github.event.pull_request.head.repo.full_name == github.repository to the condition.

Fork PRs on a public repo can trigger jobs that consume secrets or have
write permissions. Three workflows needed hardening:

- docker.yml: the build job's cache-to was unconditional, so fork PRs
  would attempt to push build cache to GHCR after skipping login (noisy
  auth error). Now cache-to evaluates to empty string on fork PRs,
  matching the existing intent (build-only, no writes from forks).

- release.yml: adds github.repository == 'block/sprout' to all three
  jobs (release, release-macos-x64, release-linux) as defense-in-depth.
  The workflow is tag/dispatch-only so forks can't normally trigger it,
  but the guard makes intent explicit and blocks any edge-case path.

- auto-tag-on-release-pr-merge.yml: the if condition checked branch
  name but not whether the PR came from a fork. A fork PR with a
  version-bump/ branch merged by a maintainer would have triggered tag
  creation and a full release build.
@wpfleger96 wpfleger96 merged commit 39d9aa8 into main Jun 12, 2026
24 checks passed
@wpfleger96 wpfleger96 deleted the worktree-wpfleger+add-fork-guards branch June 12, 2026 17:53
wpfleger96 added a commit that referenced this pull request Jun 12, 2026
…session-new

* origin/main:
  Add relay disconnect UX: friendly errors, reconnect, cached identity (#1004)
  feat(agents): add active turn indicators to Agents Menu (#1005)
  ci: add fork guards to docker, release, and auto-tag workflows (#1007)
  docs(nip-rs): add optional thread read context scheme (#1006)
tellaho added a commit that referenced this pull request Jun 12, 2026
…tate

* origin/main:
  Add relay disconnect UX: friendly errors, reconnect, cached identity (#1004)
  feat(agents): add active turn indicators to Agents Menu (#1005)
  ci: add fork guards to docker, release, and auto-tag workflows (#1007)
  docs(nip-rs): add optional thread read context scheme (#1006)
  fix(huddle): Pocket TTS quality overhaul — reference parity + cross-message pipelining (#997)
  Add manual ACP session rotation command (#932)
  fix(desktop): heal stale persona_team_dir paths in release builds (#1003)
  ci(docker): publish public ghcr.io/block/buzz image (native multi-arch) (#986)
  fix(buzz-agent): cap tool-result text at 50 KiB with middle elision (#952)
  feat(huddle): sentence-at-a-time voice-mode guidelines for lower TTS latency (#996)
  Shard desktop Playwright CI jobs (#992)
  chore(release): release version 0.3.18 (#995)
  Video Player Improvements  (#993)
  Improve first-run welcome setup (#970)
  fix(release): use legacy updater key secret (#991)
  Replace built-in personas with Fizz (#987)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant